#ifndef DEMO_2_H
#define DEMO_2_H
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#define HELLO_EXPORTS
#ifdef HELLO_EXPORTS
#define EXPORTS_API extern "C" __declspec(dllexport)
#else
#define EXPORTS_API extern "C" __declspec(dllimport)
#endif // HELLO_EXPORTS
typedef struct{
	char bufstatic[100];
	//���ݰ�����
	char buftype[20];
	//���ݰ�ͨ��
	char bufchannel[100];
	//��ȡ������
	unsigned char *rawbuf;
	//��ȡ�������ݳ���
	int buflen;
	//���ݰ�״̬
	int buffig;
	//���ݰ�����
	unsigned char *	bufbody;
	unsigned char *	ephbufbody;
	int bufbodylen;
	int tobufbodylen;
	int ephbufbodylen;
	//����
	unsigned char *comdata;
	//�ص�����	 �������ݽ��� 1���������� 2:�������ݰ�
	//initcommand�г�ʼ��
	int(*onPack1)();
	int(*onPack2)();
} damoDecoder;

damoDecoder StaComDamo;


void initcommand();
//extern void inputBuf(damoDecoder *damo, char *buf, int l);
int parsingcommand(damoDecoder* pdecoder, unsigned char data);
int  Completeness(int type, damoDecoder* pdecoder);
int  splicingcommand(int comid,unsigned char* channel,unsigned char* comdata,int len);
int onPack2con(unsigned char* comdata, int len);
int onPack1con(unsigned char* comdata, int len);
void Apipardata(damoDecoder* StaComDamo,char medata[],int r);
#endif //_HELLO_H_



